import request from '@/api/socialized-servce/index.js' //引入http.js
const api = request
export default {
	// 聊天列表
	queryChartList(params) {
		let url = `socialized-expert/messageRecord/custom/queryChatList`
		return api.request(url, 'post', params)
		// let url = `expert/messageRecord/queryChatList?serviceProviderNo=${serviceProviderNo}`
		// return api.request(url, 'get')
	},
	// 查询与指定用户的聊天记录
	queryHistoryMessage(params) {
		let url = 'socialized-expert/messageRecord/queryHistoryMsgPage'
		return api.request(url, 'post', {
			...params
		})
	},
	// 查询与指定用户的聊天记录
	queryHistoryMessage(params) {
		let url = 'socialized-expert/messageRecord/queryHistoryMsgPage'
		return api.request(url, 'post', {
			...params
		})
	},
	// 查询申请咨询列表
	queryAuditList() {
		let url = 'socialized-expert/chat/order/audit/list'
		return api.request(url, 'get')
	},
	// 专家咨询订单审批
	audit(params) {
		let url = `socialized-expert/chat/order/audit?id=${params.id}&flag=${params.flag}`
		return api.request(url, 'get')
	},
	// 专家咨询服务完成
	over(id) {
		let url = `socialized-expert/chat/order/over?id=${id}`
		return api.request(url, 'get')
	},
	// 查询专家当前的服务用户
	queryExpertServiceList(params) {
		let url = `socialized-expert/messageRecord/expert/queryChatList`
		return api.request(url, 'post', params)
		// let url = `expert/messageRecord/queryExpertServiceList?serviceProviderNo=${serviceProviderNo}`
		// return api.request(url, 'get')
	}
}